package cn.edu.klmy.dao;

import cn.edu.klmy.models.course.Textbook;

import java.util.List;
import java.util.Map;

public interface ITextbookDao {
    void addTextbook(Textbook textbook);

    void removeTextbook(String fieldName, Object value);

    void updateTextbook(Textbook textbook);
    
    boolean textbookExists(String textbookName);

    List<Textbook> getTextbooks(String fieldName, Object value);

    List<Textbook> getTextbooks(Map<String, Object[]> filter, int pageNum, int pageSize);

    int getTextbookCount(Map<String, Object[]> filter);

    void addTextbooksToCourse(int[] textbookIds, int courseId);

    void removeTextbooksFromCourse(int[] textbookIds, int courseId);

    void removeAllTextbooksFromCourse(int courseId);

    List<Textbook> getTextbooksInCourse(int courseId);

    List<Textbook> getTextbooksNotInCourse();
}
